<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\BaseController;
use Illuminate\Http\Request;

/**
 * @package App\Http\Controllers\Api
 * @see ProCategoryController
 */
class ProCategoryController extends BaseController
{

    /**
     * getList
     * @uri /pro-category/list
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     * @request []
     * @response {"success":true,"statusCode":200,"result":{"total_count":8,"page_size":20,"page":1,"list":[{"id":2,"name":"\u804c\u4e1a\u53d1\u5c55"}]},"message":"OK"}
     */
    public function getList(Request $request)
    {
        $params = $request->all();

        // @todo api data from mock.
        $mock = json_decode(
            mb_convert_encoding(
                '{"success":true,"statusCode":200,"result":{"total_count":8,"page_size":20,"page":1,"list":[{"id":2,"name":"\u804c\u4e1a\u53d1\u5c55"}]},"message":"OK"}'
                , 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' )
            , true
        );
        $data = $mock['result'];

        return $this->apiReturn($data);
    }

}